package charpter11.lynx;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class One {
	private int gerbilNumber;
	One(){
		gerbilNumber = new Random().nextInt();
	}
	
	public void hop(){
		System.out.println(gerbilNumber + " is hopping.");
	}
	
	public static void main(String[] args){
		List<One> gerbils = new ArrayList<One>();
		for (int i = 0; i < 100; i ++){
			gerbils.add(new One());
		}
		for (int i = 0; i < gerbils.size(); i++){
			gerbils.get(i).hop();
		}
	}
}
